import 'package:json_annotation/json_annotation.dart';

part 'mo_scope_task.g.dart';

@JsonSerializable()
class MoScopeTask {
  @JsonKey(defaultValue: 0)
  final int Code;
  final DataBean? Data;
  @JsonKey(defaultValue: '')
  final String Message;
  @JsonKey(defaultValue: '')
  final String RequestId;
  @JsonKey(defaultValue: false)
  final bool Success;

  MoScopeTask({
    required this.Code,
    this.Data,
    required this.Message,
    required this.RequestId,
    required this.Success,
  });

  factory MoScopeTask.fromJson(Map<String, dynamic> json) =>
      _$MoScopeTaskFromJson(json);

  Map<String, dynamic> toJson() => _$MoScopeTaskToJson(this);
}

@JsonSerializable()
class DataBean {
  @JsonKey(defaultValue: '')
  final String id;

  DataBean({
    required this.id,
  });

  factory DataBean.fromJson(Map<String, dynamic> json) =>
      _$DataBeanFromJson(json);

  Map<String, dynamic> toJson() => _$DataBeanToJson(this);
}
